<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ page import="java.io.IOException"%>
<%@ page import="java.sql.Connection"%>
<%@ page import="java.sql.SQLException"%>
<%@ page import="java.sql.ResultSet"%>
<%@ page import="java.sql.DriverManager"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core_rt"%>
<%
	String user[] = { "admin", "lgq", "guest", "user", "admin", "lgq",
			"guest", "user" };
	//SELECT * FROM eschool.course;
	try (Connection con = DriverManager.getConnection(
			"jdbc:sqlserver://192.168.7.45:1433;databaseName=Vip", "",
			"");) {
	} catch (SQLException | IOException e) {

	}

	request.setAttribute("user", user);
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>My JSP 'index.jsp' starting page</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
</head>
<body>
	<table border="1" width="60%">
		<tr>
			<td>内容</td>
			<td>索引值</td>
			<td>共访问过</td>
			<td>是否为第一个成员</td>
			<td>是否为最后一个成员</td>
		</tr>
		<c:forEach items="${user}" var="u" varStatus="s">
			<tr align="left">
				<td><c:out value="${u}" /></td>
				<td><c:out value="${s.index}" /></td>
				<td><c:out value="${s.count}" /></td>
				<td><c:out value="${s.first}" /></td>
				<td><c:out value="${s.last}" /></td>
			</tr>
		</c:forEach>
	</table>
</body>
</html>